﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DLL.TrainingExperience
{
	/// <summary>
	/// 培训经历控制类
	/// </summary>
	public class Component
	{
		private Database clsDB;
		private System.Web.UI.Page page;

		public Component(System.Web.UI.Page page)
		{
			clsDB = new Database(page);
			page = new System.Web.UI.Page();

			this.page = page;
		}

		/// <summary>
		/// 添加
		/// </summary>
		/// <param name="clsAdd"></param>
		public bool Add(Entity clsAdd)
		{
			clsAdd.Status = 2;
			clsAdd.Count = 0;
			clsAdd.Channel = 8;
			clsAdd.State = "完成";
			clsAdd.DayNumber = TonyNet4V1.CommonFunction.GetDays(clsAdd.StartDate, clsAdd.EndDate);

			return clsDB.Add(clsAdd);
		}
	}
}
